# coding=utf8

lexicon = {} #the segmental lexicon


class phon():
    """
    A representation of an individual phontic segment

    Args:
        None (initialized by filling in fields manually)
    Fields:
        symbol: the (ipa/unicode) character representing the segment (e.g. 'p')
        cons: 1 if a C(onsonant), -1 if a V(owel)
        approx: 1 if an Approximant, -1 otherwise
        son: 1 if a Sonorant, -1 otherwise
        cont: 1 if a Continuant, -1 otherwise
        nasal: 1 if a Nasal, -1 otherwise
        voice: 1 if voiced, -1 if voiceless
        lab: 1 if labial, -1 otherwise
        cor: 1 if coronal, -1 otherwise
        ant: 1 if anterior, -1 otherwise
        strid: 1 if strident, -1 otherwise
        lat: 1 if lateral, -1 otherwise
        pal: 1 if palatal, -1 otherwise
        velar: 1 if velar, -1 otherwise
        uvul: 1 if uvular, -1 otherwise
        glot: 1 if glottal, -1 otherwise
        high: 1 if high, -1 otherwise
        back: 1 if back, -1 otherwse
                
    """
    def __init__(self, symbol = ""):
        self.symbol = symbol
        self.tipa = symbol
        self.cons = 1
        self.approx = -1
        self.son = -1
        self.cont = -1
        self.nasal = -1
        self.voice = -1
        self.lab = -1
        self.cor = -1
        self.ant = -1
        self.strid = -1
        self.retro = -1
        self.lat = -1
        self.pal = -1
        self.velar = -1
        self.uvul = -1
        self.glot = -1
        self.high = 0
        self.back = 0
    


#voiced bilabial stop
lexicon['b'] = phon('b')
lexicon['b'].voice = 1
lexicon['b'].lab = 1

#glottal stop
lexicon['ʔ'] = phon('ʔ')
lexicon['ʔ'].tipa = "P"
lexicon['ʔ'].glot = 1

#voiceless bilabial stop
lexicon['p'] = phon('p')
lexicon['p'].lab = 1

#voiced alveolar/dental stop
lexicon['d'] = phon('d')
lexicon['d'].voice = 1
lexicon['d'].cor = 1

#voiceless alveolar/dental stop
#voiced alveolar/dental stop
lexicon['t'] = phon('t')
lexicon['t'].cor = 1

#voiced velar stop
lexicon['g'] = phon('g')
lexicon['g'].voice = 1
lexicon['g'].velar = 1

#voiceless velar stop
lexicon['k'] = phon('k')
lexicon['k'].velar = 1

#voiced retroflex stop
lexicon['ɖ'] = phon('ɖ')
lexicon['ɖ'].tipa = "\:d"
lexicon['ɖ'].voice = 1
lexicon['ɖ'].retro = 1
lexicon['ɖ'].cor = 1

#voiced palatal stop
lexicon['ɟ'] = phon('ɟ')
lexicon['ɟ'].tipa = "\textbardotlessj"
lexicon['ɟ'].voice = 1
lexicon['ɟ'].pal = 1
lexicon['ɟ'].high = 1

        
        
